﻿@using Telerik.Web.Mvc.UI;
@using Telerik.Web.Mvc;
@{
    string LangCode = SF.GetLangCode();
    List<string> rltList = new List<string>() { "he-IL" };
    bool RTL = true;
    if (rltList.Contains(LangCode)) { RTL = true; }
    else { RTL = false; }

    string Skin = System.Configuration.ConfigurationManager.AppSettings["SkinDefault"];
    if (Session["SkinSelectList"] != null) { Skin = Session["SkinSelectList"] as string; }
}
<!DOCTYPE html>
<html>
<head>
    <title>Uco Admin | @ViewBag.Title</title>
    @if (RTL)
    {
        @(Html.Telerik().StyleSheetRegistrar().DefaultGroup(group => group
        .Add("telerik.common.css")
        .Add("telerik." + Skin + ".css")
        .Add("telerik.rtl.css")
        .Add("~/Areas/Admin/Content/uco.css")
        .Add("~/Areas/Admin/Content/uco.rtl.css")
        .Combined(true)
        .Compress(true)))
    }
    else
    {
        @(Html.Telerik().StyleSheetRegistrar().DefaultGroup(group => group
        .Add("telerik.common.css")
        .Add("telerik." + Skin + ".css")
        .Add("~/Areas/Admin/Content/uco.css")
        .Combined(true)
        .Compress(true)))
    }
</head>
<body class="@(RTL ? "t-rtl" : "t-ltr")">
    <div id="page">
        @if (RTL)
        {
            Html.Telerik().Splitter().Name("sMain")
                  .HtmlAttributes(new { style = "height: 100%; border: 0;" })
                  .Orientation(SplitterOrientation.Vertical)
                  .Panes(vPanes =>
                  {
                      vPanes.Add()
                          .Size("26px")
                          .Collapsible(false)
                          .Scrollable(false)
                          .Resizable(false)
                          .HtmlAttributes(new { @class = "menuPanel" })
                          .Content(@<div id="header">@Html.Partial("_Menu")<div id="header_logof">@Html.Partial("_LogOnPartial")</div></div>);
                      vPanes.Add()
                          .Scrollable(false)
                          .Content(Html.Telerik().Splitter().Name("sIn")
                                .HtmlAttributes(new { style = "height: 100%; width: 100%; border: 0; overflow: hidden;" })
                                .Orientation(SplitterOrientation.Horizontal)
                                .Panes(panes =>
                                {
                                    panes.Add()
                                        .Scrollable(true)
                                        .HtmlAttributes(new { style = "overflow:hidden;" })
                                        .Content(@<div id="content">@RenderBody()</div>);
                                    panes.Add()
                                        .Size("250px")
                                        .MinSize("200px")
                                        .MaxSize("350px")
                                        .Collapsible(true)
                                        .Scrollable(true)
                                        .Resizable(true)
                                        .Content(@<div id="right">
                                        @Html.Partial("_TreeView")
                                        </div>);
                                }).ToString());
                  })
                  .Render();
            
        }
        else
        {
            Html.Telerik().Splitter().Name("sMain")
                  .HtmlAttributes(new { style = "height: 100%; border: 0;" })
                  .Orientation(SplitterOrientation.Vertical)
                  .Panes(vPanes =>
                  {
                      vPanes.Add()
                          .Size("26px")
                          .Collapsible(false)
                          .Scrollable(false)
                          .Resizable(false)
                          .HtmlAttributes(new { @class = "menuPanel" })
                          .Content(@<div id="header">@Html.Partial("_Menu")<div id="header_logof">@Html.Partial("_LogOnPartial")</div></div>);
                      vPanes.Add()
                          .Scrollable(false)
                          .Content(Html.Telerik().Splitter().Name("sIn")
                                .HtmlAttributes(new { style = "height: 100%; width: 100%; border: 0; overflow: hidden;" })
                                .Orientation(SplitterOrientation.Horizontal)
                                .Panes(panes =>
                                {
                                    panes.Add()
                                        .Size("250px")
                                        .MinSize("200px")
                                        .MaxSize("350px")
                                        .Collapsible(true)
                                        .Scrollable(true)
                                        .Resizable(true)
                                        .Content(@<div id="right">
                                        @Html.Partial("_TreeView")
                                        </div>);
                                    panes.Add()
                                        .Scrollable(true)
                                        .HtmlAttributes(new { style = "overflow:hidden;" })
                                        .Content(@<div id="content">@RenderBody()</div>);

                                }).ToString());

                  })
                  .Render();
            
        }

    </div>

@(Html.Telerik().ScriptRegistrar()
    .Globalization(true)
    .DefaultGroup(group => group
        .Add("http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js")
        .Add("http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.unobtrusive-ajax.min.js")
        .Add("http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.validate.unobtrusive.min.js")
        .Combined(true)
        .Compress(true))
    .Scripts(group => group
        .Add("~/Scripts/telerik.extensions" + (RTL ? ".rtl" : "") + ".js"))
)
@Html.Partial("_Scripts")
</body>
</html>